<style>
li img{max-height:90px; max-width:160px}
.layui-input-block .layui-table td{border: none}
</style>

<input type="hidden" name="news.id" value="#(news.id)">
<div class="layui-form-item">
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">状态</label>
		<div class="layui-input-block">
			<input type="radio" name="news.status" value="on" title="启用" #if(news.status == 'on' || news.status == null) checked #end>
			<input type="radio" name="news.status" value="off" title="禁用" #if(news.status == 'off') checked #end>
		</div>
	</div>
</div>

<div class="layui-form-item">
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">标题</label>
		<div class="layui-input-inline">
			<input type="text" name="news.title" lay-verify="required|title" autocomplete="off" class="layui-input" value="#(news.title)">
		</div>
	</div>
</div>

<div class="layui-form-item">
	<label class="layui-form-label">子标题</label>
	<div class="layui-input-block">
		<textarea placeholder="请输入内容" name="news.subtitle" class="layui-textarea">#(news.subtitle)</textarea>
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">标签</label>
	<div class="layui-input-block">
		<select name="news.tags" xm-select="news_tags_selects">
	#tagList()
		#for(tag : tagList)
			<option value="#(tag.name)" #if(news.tagList.contains(tag.name))selected#end>#(tag.name)</option>
		#end
	#end
		</select>
	</div>
</div>

<div class="layui-form-item">
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">分类</label>
		<div class="layui-input-inline">
			<select name="news.categoryId" lay-verify="required">
				<option value="">-- 请选择 --</option>
				#for(newsCategory : newsCategoryList)
				<option value="#(newsCategory.id)" #if(newsCategory.id == news.categoryId) selected #end>#(newsCategory.name)</option>
				#end
			</select>
		</div>
	</div>
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">置顶</label>
		<div class="layui-input-inline">
			<input type="radio" name="news.onTop" value="true" title="是" #if(news.onTop || news.status == null) checked #end>
			<input type="radio" name="news.onTop" value="false" title="否" #if(!news.onTop) checked #end>
		</div>
	</div>
</div>

<div class="layui-form-item">
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">原始点击数</label>
		<div class="layui-input-inline">
			<input type="text" name="news.baseHits" lay-verify="required|number" autocomplete="off" class="layui-input" value="#(news.baseHits)">
		</div>
	</div>
	<div class="layui-inline">
		<label class="layui-form-label">点击数</label>
		<div class="layui-input-inline">
			<input type="text" name="news.hits" disabled lay-verify="required|number" autocomplete="off" class="layui-input layui-disabled" value="#(news.hits)">
		</div>
	</div>
</div>

<div class="layui-form-item">
	<label class="layui-form-label">说明</label>
	<div class="layui-input-block">
		<textarea placeholder="请输入内容" name="news.remark" class="layui-textarea">#(news.remark)</textarea>
	</div>
</div>

<div class="layui-tab layui-tab-brief">
	<ul class="layui-tab-title">
		<li class="layui-this"><i class="layui-icon layui-icon-website"></i>  桌面端</li>
		<li><i class="layui-icon layui-icon-cellphone"></i>  移动端</li>
	</ul>
	<div class="layui-tab-content">
		<div class="layui-tab-item layui-show">
			<div class="layui-form-item">
				<label class="layui-form-label">跳转链接</label>
				<div class="layui-input-block">
					<input type="text" name="news.url" class="layui-input" placeholder="点击新闻标题时的跳转地址" value="#(news.url)">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">图片</label>
				<div class="layui-input-block">
					<ul>
						<li class="hide_in_view">
							<table class="layui-table">
								<tr>
									<td width="10px">
										<input type="hidden" id="ID_news_img_url" name="news.img" value="#(news.img)">
										<button type="button" class="layui-btn jfsa-select-image" id="ID_news_img_upload" jfsa-input="ID_news_img_url" jfsa-img="ID_news_img_img">设置</button>
									</td>
									<td>
										<div class="layui-form-mid layui-word-aux"></div>
									</td>
								</tr>
							</table>
						</li>
						<li style="height: 90px">
							<img onclick="Jfsa.reviewImage(this);" src="#(news.img)" id="ID_news_img_img">
						</li>
					</ul>
				</div>
			</div>
			<textarea id="ID_news_content">
				#(news.content)
			</textarea>
			<textarea id="ID_news_content_input" name="news.content" style="display: none;">
				#(news.content)
			</textarea>
		</div>
		<div class="layui-tab-item">
			<blockquote class="layui-elem-quote">内容为空时采用桌面端内容</blockquote>
			<div class="layui-form-item">
				<label class="layui-form-label">跳转链接</label>
				<div class="layui-input-block">
					<input type="text" name="news.urlH5" class="layui-input" placeholder="点击新闻标题时的跳转地址，如果不填写则使用桌面端地址" value="#(news.urlH5)">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">图片</label>
				<div class="layui-input-block">
					<ul>
						<li class="hide_in_view">
							<table class="layui-table">
								<tr>
									<td width="10px">
										<input type="hidden" id="ID_news_img_h5_url" name="news.imgH5" value="#(news.imgH5)">
										<button type="button" class="layui-btn jfsa-select-image" id="ID_news_img_h5_upload" jfsa-input="ID_news_img_h5_url" jfsa-img="ID_news_img_h5_img">设置</button>
									</td>
									<td>
										<div class="layui-form-mid layui-word-aux"></div>
									</td>
								</tr>
							</table>
						</li>
						<li style="height: 90px">
							<img onclick="Jfsa.reviewImage(this);" src="#(news.imgH5)" id="ID_news_img_h5_img">
						</li>
					</ul>
				</div>
				<textarea id="ID_news_content_h5">#(news.contentH5)</textarea>
				<textarea id="ID_news_content_h5_input" name="news.contentH5" style="display: none;">#(news.contentH5)</textarea>
			</div>
		</div>
	</div>
</div>

<fieldset class="layui-elem-field" style="padding: 10px">
	<legend>SEO设置</legend>
	<blockquote class="layui-elem-quote">内容为空时采用全局设置</blockquote>
	<div class="layui-form-item">
		<div class="layui-inline">
			<label class="layui-form-label">标题</label>
			<div class="layui-input-inline">
				<input type="text" name="news.seoTitle" placeholder="请输入SEO关键词" class="layui-input" value="#(news.seoTitle)">
			</div>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">关键词</label>
		<div class="layui-input-block">
			<input type="text" name="news.seoMetaKeywords" placeholder="用英文逗号隔开各关键词" class="layui-input" value="#(news.seoMetaKeywords)">
		</div>
	</div>
	<div class="layui-form-item layui-form-text">
		<label class="layui-form-label">描述</label>
		<div class="layui-input-block">
			<textarea name="news.seoMetaDescription" placeholder="请输入SEO描述" class="layui-textarea">#(news.seoMetaDescription)</textarea>
		</div>
	</div>
</fieldset>
